setListenerForTransitionEnd

open fun setListenerForTransitionEnd(@NonNull outFragment: Fragment, @NonNull transition: Any, @NonNull signal: CancellationSignal, @NonNull transitionCompleteRunnable: Runnable)(source)

Set a listener for Transition end events. The default behavior immediately completes the transition.

Parameters

outFragment

The first fragment that is exiting

transition

all transitions to be executed on a single container

signal

used indicate the desired behavior on transition cancellation

transitionCompleteRunnable

used to notify the FragmentManager when a transition is complete


open fun setListenerForTransitionEnd(@NonNull outFragment: Fragment, @NonNull transition: Any, @NonNull signal: CancellationSignal, @Nullable cancelRunnable: Runnable, @NonNull transitionCompleteRunnable: Runnable)(source)

Set a listener for Transition end events. The default behavior immediately completes the transition. Use this when the given transition is seeking. The cancelRunnable should handle cleaning up the transition when seeking is cancelled. If the transition is not seeking, you should use setListenerForTransitionEnd.

Parameters

outFragment

The first fragment that is exiting

transition

all transitions to be executed on a single container

signal

used indicate the desired behavior on transition cancellation

cancelRunnable

runnable to handle the logic when the signal is cancelled

transitionCompleteRunnable

used to notify the FragmentManager when a transition is complete